<template>
    <!-- 
    <b-modal ref="my-modal" hide-footer title="Using Component Methods">
     <div class="d-block text-center">
       <h3>Hello From My Modal!</h3>
     </div>
     <b-button class="mt-3" variant="outline-danger" block @click="hideModal">Close Me</b-button>
     <b-button class="mt-2" variant="outline-warning" block @click="toggleModal">Toggle Me</b-button>
   </b-modal> 
    -->
    <!--
        body-class="modalStyle" 表示样式
        size="lg" 表示模态窗口大小 xl,lg,sm,full
        hide-footer 表示隐藏底部按钮
        hide-header 表示隐藏头部内容
        no-close-on-backdrop 表示鼠标点击背景不可关闭
        hide-header-close 表示隐藏头部关闭按钮
        centered 居中
        ok-title=“确定” 
        cancel-title=取消
        @ok="handleOk" 
        @cancel="handleCancel"
        scrollable 滚动条
        hide-backdrop 隐藏背景
        wrapClassName="ant-modal-cust-warp" 
        style="top:5%;height: 85%;overflow-y: hidden" 样式
        :modal-class="my-modal"
        dialog-class="modal-dialog"
        @hidden 关闭窗体触发事件
    -->
    <b-modal ref="my-modal" :title="title" scrollable content-class="fullWinBody" @hidden="onHidden" size="fullWin" centered hide-footer no-close-on-backdrop >
        <div class="d-block text-center">
            <LcFormField :lc_form_id="lc_form_id"></LcFormField>
        </div>
        <template slot="modal-footer">
            <!--自定义按钮-->
        </template>
    </b-modal>    
</template>
<script>
import apiUtil from "@/core/util/apiUtil.js";
import LcFormField from "@/view/workflow/lc-form-field/lc-form-field-list.vue";
import { handleNotify,handleAlert,handleConfirm,showWating,closeWating} from "@/core/util/jehcUtil.js";
export default {
    data(){
        return {
            title:"表单字段",
            lc_form_id:"",
        }
    },
    components: {
        LcFormField,
    },
    watch: {

    },
    mounted() {        
       
    },
    methods: {        
        showModal(row) {
            this.$refs['my-modal'].show();
            this.lc_form_id = "";
            this.title = "表单字段";
            if(null != row && undefined != row){
                this.lc_form_id = row.lc_form_id;
                this.title = "表单字段【"+row.title+"】";
            }
        },
        hideModal() {
            this.$refs['my-modal'].hide()
        },
        toggleModal() {
            // 当模态已隐藏时，我们传递要返回焦点的按钮的ID
            this.$refs['my-modal'].toggle('#toggle-btn')
        },
        onHidden(){//关闭窗体触发事件
            this.$emit("change",null);
        },
   }
}
</script>